import { BehaviorTree } from "./BehaviorTree";
import { Blackboard } from "./Blackboard";
import { BaseNode } from "./BaseNode";

export class Tick {
    tree: BehaviorTree;
    debug: any;
    target: any;
    blackboard: Blackboard;
    _openNodes: BaseNode[] = [];
    _nodeCount: number = 0;

    constructor() {
        this.tree       = null;
        this.debug      = null;
        this.target     = null;
        this.blackboard = null;

        this._openNodes  = [];
        this._nodeCount  = 0;
    }

    _enterNode(node: BaseNode) {
        this._nodeCount++;
        this._openNodes.push(node);
        // this.target.onEnter(node);
    }

    _openNode(node: BaseNode) {
        // this.target.onOpen(node);
    }

    _tickNode(node: BaseNode) {
        // this.target.onTick(node);
    }

    _closeNode(node: BaseNode) {
        this._openNodes.pop()
        // this.target.onClose(node);
    }

    _exitNode(node: BaseNode) {
        // this.target.onExit(node);
    }
}